﻿using ApplicationLibrary.SqlConnector;

namespace Vintner.Items.ModuleData
{
    #region VI_Items

    public class VI_Items : Table
    {
        public static string Name = "VI_Items";

        public static Column<string> Item = new Column<string>(Name, Properties.Resources.T_Item, "Item", LEN.LONG_CODE, false);
        public static Column<string> Description = new Column<string>(Name, Properties.Resources.T_Description, "Description", LEN.BIG_DESCRIPTION);
        public static Column<double> Size = new Column<double>(Name, "", "Size");
        public static Column<bool> Disabled = new Column<bool>(Name, Properties.Resources.T_Disabled, "Disabled");

        public override iColumn ForeignKey
        {
            get { return Item; }
        }

        public VI_Items()
        {
            VisibleInRadar(new iColumn[] { Item, Description });
            Tablename = Name;
            DefineKey(new iColumn[] { Item });
        }
    }

    #endregion

    #region VI_ItemsPrice

    public class VI_ItemsPrice : Table
    {
        public static string Name = "VI_ItemsPrice";

        public static Column<string> Item = new Column<string>(Name, Properties.Resources.T_Item, "Item", LEN.LONG_CODE, false);
        public static Column<string> Category = new Column<string>(Name, Properties.Resources.T_Category, "Category", LEN.CODE, false);
        public static Column<double> Price = new Column<double>(Name, Properties.Resources.T_Price, "Price");
        public static Column<string> TaxCode = new Column<string>(Name, Properties.Resources.T_TaxCode, "TaxCode", LEN.CODE);
        public static Column<bool> Disabled = new Column<bool>(Name, Properties.Resources.T_Disabled, "Disabled");

        public override iColumn ForeignKey
        {
            get { return Item; }
        }
    }

    #endregion

    #region VI_ItemCustomerPrice

    public class VI_ItemCustomerPrice : Table
    {
        public static string Name = "VI_ItemCustomerPrice";
        public static Column<string> Item = new Column<string>(Name, "", "Item", LEN.LONG_CODE, false);
        public static Column<string> Customer = new Column<string>(Name, Properties.Resources.T_Code, "Code", LEN.CODE, false);
        public static Column<string> Category = new Column<string>(Name, Properties.Resources.T_Category, "Category", LEN.CODE, false);
        public static Column<string> Description = new Column<string>(Name, "", "Description", LEN.BIG_DESCRIPTION);

        //public static Column<string> DescCategory = new Column<string>(Name, "", "DescCategory", LEN.CODE);
        public static Column<double> Price = new Column<double>(Name, Properties.Resources.T_Price, "Price");

        public static Column<string> TaxCode = new Column<string>(Name, Properties.Resources.T_TaxCode, "TaxCode", LEN.CODE);
        public static Column<bool> Disabled = new Column<bool>(Name, Properties.Resources.T_Disabled, "Disabled");

        public override iColumn ForeignKey
        {
            get { return Item; }
        }
    }

    #endregion
}